import request from '../utils/request.js';

export default {
  // 根据企业微信后台Web获取到的code 获取优课优信WebToken
  GetWorkWechatWebToken: (params) =>
    request('/WorkWechat/v3/Auth/GetWorkWechatWebToken', { method: 'GET', params }),
  // 获取用户Token
  GetWebToken: (params) => request('/base/v3/Auth/GetWebToken', { method: 'GET', params }),

  // 获取用户可管理的微官网列表
  GetOfficialList: (params) =>
    request('/wgw/v3/AuthWeb/GetOfficialList', { method: 'GET', params }),

  // 获取音视频上传Token 等相关信息
  GetMediaUploadToken: (params) =>
    request('/wgw/v3/CommonWeb/GetMediaUploadToken', { method: 'GET', params }),

  // 保存裁剪图片
  CropImage: (params) => request('/wgw/v3/CommonWeb/CropImage', { method: 'POST', params }),

  // 上传音视频
  UploadMedia: ({ params, data }) =>
    request('/wgw/v3/CommonWeb/UploadMedia', { method: 'POST', params, body: data }),
};
